package com.zxy.feignclients.fallback;

import com.zxy.feignclients.ProductClients;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 * @author: Zxy
 * @description:
 * @date: 2021-08-07 15:25
 */
@Component(value = "productClient")
public class ProductFallback implements FallbackFactory<ProductClients> {

    @Override
    public ProductClients create(Throwable throwable) {
        return id -> "服务出现异常";
    }
}
